package com.eyedsion.his.web.entity.common;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 彭长云
 * @Description:
 * @date 2018/12/10 9:53
 */
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class BaseEntity implements Serializable{
    @CreatedDate
    @Column(updatable = false)
    private Date decCreateTime;//创建时间 [CREATE_TIME, DATE, 7]
    @LastModifiedDate
    @Column(insertable = false)
    private Date decUpdateTime;//更新时间 [UPDATE_TIME, DATE, 7]
    @CreatedBy
    private String decCreateUser = "0000001";//创建人 [CREATE_USER, VARCHAR2, 32]

    public Date getDecCreateTime() {
        return decCreateTime;
    }

    public void setDecCreateTime(Date decCreateTime) {
        this.decCreateTime = decCreateTime;
    }

    public Date getDecUpdateTime() {
        return decUpdateTime;
    }

    public void setDecUpdateTime(Date decUpdateTime) {
        this.decUpdateTime = decUpdateTime;
    }

    public String getDecCreateUser() {
        return decCreateUser;
    }

    public void setDecCreateUser(String decCreateUser) {
        this.decCreateUser = decCreateUser;
    }
}
